package structures;

import java.util.Arrays;

import pack.MyReader;

public class CardFaultRecord extends TypeAbstract{
	
	public static int size = 24;
	public byte[] emptyValue = {0,0,0,0,0,0,0,0,0,0,0,32,32,32,32,32,32,32,32,32,32,32,32,32};
	
	public final EventFaultType faultType;
	public final TimeReal faultBeginTime ;
	public final TimeReal faultEndTime;
	public final VehicleRegistrationIdentification faultVehicleRegistration;
	
	public CardFaultRecord(MyReader reader)
	{
		if(size != 0 && emptyValue != null){
			empty = Arrays.equals(reader.read(size), emptyValue);
			reader.offset -= size;
		}
		
		faultType = new EventFaultType(reader);
		faultBeginTime = new TimeReal(reader);
		faultEndTime = new TimeReal(reader);
		faultVehicleRegistration = new VehicleRegistrationIdentification(reader);
	}
}
